\(\int \frac {\log (c (a+b x^2)^p)}{x^2} \, dx\) [7]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 44 \[ \int \frac {\log \left (c \left (a+b x^2\right )^p\right )}{x^2} \, dx=\frac {2 \sqrt {b} p \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {\log \left (c \left (a+b x^2\right )^p\right )}{x} \]

[Out]

-ln(c*(b*x^2+a)^p)/x+2*p*arctan(x*b^(1/2)/a^(1/2))*b^(1/2)/a^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2505, 211} \[ \int \frac {\log \left (c \left (a+b x^2\right )^p\right )}{x^2} \, dx=\frac {2 \sqrt {b} p \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {\log \left (c \left (a+b x^2\right )^p\right )}{x} \]

[In]

Int[Log[c*(a + b*x^2)^p]/x^2,x]

[Out]

(2*Sqrt[b]*p*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/Sqrt[a] - Log[c*(a + b*x^2)^p]/x

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2505

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))*((f_.)*(x_))^(m_.), x_Symbol] :> Simp[(f*x)^(m +
 1)*((a + b*Log[c*(d + e*x^n)^p])/(f*(m + 1))), x] - Dist[b*e*n*(p/(f*(m + 1))), Int[x^(n - 1)*((f*x)^(m + 1)/
(d + e*x^n)), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = -\frac {\log \left (c \left (a+b x^2\right )^p\right )}{x}+(2 b p) \int \frac {1}{a+b x^2} \, dx \\ & = \frac {2 \sqrt {b} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {\log \left (c \left (a+b x^2\right )^p\right )}{x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00 \[ \int \frac {\log \left (c \left (a+b x^2\right )^p\right )}{x^2} \, dx=\frac {2 \sqrt {b} p \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {\log \left (c \left (a+b x^2\right )^p\right )}{x} \]

[In]

Integrate[Log[c*(a + b*x^2)^p]/x^2,x]

[Out]

(2*Sqrt[b]*p*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/Sqrt[a] - Log[c*(a + b*x^2)^p]/x

Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.84

method result size
parts \(-\frac {\ln \left (c \left (b \,x^{2}+a \right )^{p}\right )}{x}+\frac {2 p b \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}}\) \(37\)
risch \(-\frac {\ln \left (\left (b \,x^{2}+a \right )^{p}\right )}{x}-\frac {i \pi a \,\operatorname {csgn}\left (i \left (b \,x^{2}+a \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )}^{2}-i \pi a \,\operatorname {csgn}\left (i \left (b \,x^{2}+a \right )^{p}\right ) \operatorname {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right ) \operatorname {csgn}\left (i c \right )-i \pi a {\operatorname {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )}^{3}+i \pi a {\operatorname {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )-2 \sqrt {-a b}\, p \ln \left (-b x -\sqrt {-a b}\right ) x +2 \sqrt {-a b}\, p \ln \left (-b x +\sqrt {-a b}\right ) x +2 \ln \left (c \right ) a}{2 a x}\) \(195\)

[In]

int(ln(c*(b*x^2+a)^p)/x^2,x,method=_RETURNVERBOSE)

[Out]

-ln(c*(b*x^2+a)^p)/x+2*p*b/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 105, normalized size of antiderivative = 2.39 \[ \int \frac {\log \left (c \left (a+b x^2\right )^p\right )}{x^2} \, dx=\left [\frac {p x \sqrt {-\frac {b}{a}} \log \left (\frac {b x^{2} + 2 \, a x \sqrt {-\frac {b}{a}} - a}{b x^{2} + a}\right ) - p \log \left (b x^{2} + a\right ) - \log \left (c\right )}{x}, \frac {2 \, p x \sqrt {\frac {b}{a}} \arctan \left (x \sqrt {\frac {b}{a}}\right ) - p \log \left (b x^{2} + a\right ) - \log \left (c\right )}{x}\right ] \]

[In]

integrate(log(c*(b*x^2+a)^p)/x^2,x, algorithm="fricas")

[Out]

[(p*x*sqrt(-b/a)*log((b*x^2 + 2*a*x*sqrt(-b/a) - a)/(b*x^2 + a)) - p*log(b*x^2 + a) - log(c))/x, (2*p*x*sqrt(b
/a)*arctan(x*sqrt(b/a)) - p*log(b*x^2 + a) - log(c))/x]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 258 vs. \(2 (39) = 78\).

Time = 7.75 (sec) , antiderivative size = 258, normalized size of antiderivative = 5.86 \[ \int \frac {\log \left (c \left (a+b x^2\right )^p\right )}{x^2} \, dx=\begin {cases} - \frac {\log {\left (0^{p} c \right )}}{x} & \text {for}\: a = 0 \wedge b = 0 \\- \frac {\log {\left (a^{p} c \right )}}{x} & \text {for}\: b = 0 \\- \frac {2 p}{x} - \frac {\log {\left (c \left (b x^{2}\right )^{p} \right )}}{x} & \text {for}\: a = 0 \\- \frac {\log {\left (0^{p} c \right )}}{x} & \text {for}\: a = - b x^{2} \\- \frac {a^{2} \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{a^{2} x + a b x^{3}} - \frac {2 a p x \sqrt {- \frac {a}{b}} \log {\left (x - \sqrt {- \frac {a}{b}} \right )}}{\frac {a^{2} x}{b} + a x^{3}} - \frac {a x^{2} \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{\frac {a^{2} x}{b} + a x^{3}} + \frac {a x \sqrt {- \frac {a}{b}} \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{\frac {a^{2} x}{b} + a x^{3}} - \frac {2 b p x^{3} \sqrt {- \frac {a}{b}} \log {\left (x - \sqrt {- \frac {a}{b}} \right )}}{\frac {a^{2} x}{b} + a x^{3}} + \frac {b x^{3} \sqrt {- \frac {a}{b}} \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{\frac {a^{2} x}{b} + a x^{3}} & \text {otherwise} \end {cases} \]

[In]

integrate(ln(c*(b*x**2+a)**p)/x**2,x)

[Out]

Piecewise((-log(0**p*c)/x, Eq(a, 0) & Eq(b, 0)), (-log(a**p*c)/x, Eq(b, 0)), (-2*p/x - log(c*(b*x**2)**p)/x, E
q(a, 0)), (-log(0**p*c)/x, Eq(a, -b*x**2)), (-a**2*log(c*(a + b*x**2)**p)/(a**2*x + a*b*x**3) - 2*a*p*x*sqrt(-
a/b)*log(x - sqrt(-a/b))/(a**2*x/b + a*x**3) - a*x**2*log(c*(a + b*x**2)**p)/(a**2*x/b + a*x**3) + a*x*sqrt(-a
/b)*log(c*(a + b*x**2)**p)/(a**2*x/b + a*x**3) - 2*b*p*x**3*sqrt(-a/b)*log(x - sqrt(-a/b))/(a**2*x/b + a*x**3)
 + b*x**3*sqrt(-a/b)*log(c*(a + b*x**2)**p)/(a**2*x/b + a*x**3), True))

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.82 \[ \int \frac {\log \left (c \left (a+b x^2\right )^p\right )}{x^2} \, dx=\frac {2 \, b p \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}} - \frac {\log \left ({\left (b x^{2} + a\right )}^{p} c\right )}{x} \]

[In]

integrate(log(c*(b*x^2+a)^p)/x^2,x, algorithm="maxima")

[Out]

2*b*p*arctan(b*x/sqrt(a*b))/sqrt(a*b) - log((b*x^2 + a)^p*c)/x

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.91 \[ \int \frac {\log \left (c \left (a+b x^2\right )^p\right )}{x^2} \, dx=\frac {2 \, b p \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}} - \frac {p \log \left (b x^{2} + a\right )}{x} - \frac {\log \left (c\right )}{x} \]

[In]

integrate(log(c*(b*x^2+a)^p)/x^2,x, algorithm="giac")

[Out]

2*b*p*arctan(b*x/sqrt(a*b))/sqrt(a*b) - p*log(b*x^2 + a)/x - log(c)/x

Mupad [B] (verification not implemented)

Time = 1.25 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.82 \[ \int \frac {\log \left (c \left (a+b x^2\right )^p\right )}{x^2} \, dx=\frac {2\,\sqrt {b}\,p\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {\ln \left (c\,{\left (b\,x^2+a\right )}^p\right )}{x} \]

[In]

int(log(c*(a + b*x^2)^p)/x^2,x)

[Out]

(2*b^(1/2)*p*atan((b^(1/2)*x)/a^(1/2)))/a^(1/2) - log(c*(a + b*x^2)^p)/x